/*
 * SelfComputeIsotropicElasticityTensor.h
 *
 *  Created on: 2018年1月9日
 *      Author: liuxiao
 */
/****************************************************************/
/* MOOSE - Multiphysics Object Oriented Simulation Environment  */
/*                                                              */
/*          All contents are licensed under LGPL V2.1           */
/*             See LICENSE for full restrictions                */
/****************************************************************/
#pragma once

#include "ComputeElasticityTensorBase.h"
#include "LinearInterpolation.h"
/**
 * ComputeElasticityTensor defines an elasticity tensor material for isi.
 * all properties changing with temperature
 */
class SelfComputeIsotropicElasticityTensor;

template <>
InputParameters validParams<SelfComputeIsotropicElasticityTensor>();

class SelfComputeIsotropicElasticityTensor : public ComputeElasticityTensorBase
{
public:
	SelfComputeIsotropicElasticityTensor(const InputParameters & parameters);

protected:
  virtual void computeQpElasticityTensor();

  /// Elastic constants
  bool _bulk_modulus_set;
  bool _lambda_set;
  bool _poissons_ratio_set;
  bool _shear_modulus_set;
  bool _youngs_modulus_set;


  const VariableValue & _temperature;
  std::vector<Real> _d;
  std::vector<Real> _bulk_modulus_list;
  std::vector<Real> _bulk_modulus_T_list;
  std::vector<Real> _lambda_list;
  std::vector<Real> _lambda_T_list;
  std::vector<Real> _poissons_ratio_list;
  std::vector<Real> _poissons_ratio_T_list;
  std::vector<Real>  _shear_modulus_list;
  std::vector<Real>  _shear_modulus_T_list;
  std::vector<Real>  _youngs_modulus_list;
  std::vector<Real>  _youngs_modulus_T_list;

  LinearInterpolation _func_bulk_modulus_T;
  LinearInterpolation _func_lambda_T;
  LinearInterpolation _func_poissons_ratio_T;
  LinearInterpolation _func_shear_modulus_T;
  LinearInterpolation _func_youngs_modulus_T;

  MaterialProperty<Real> & _bulk_modulus;
  MaterialProperty<Real> & _lambda;
  MaterialProperty<Real> & _poissons_ratio;
  MaterialProperty<Real> & _shear_modulus;
  MaterialProperty<Real> & _youngs_modulus;

  /// Individual elasticity tensor
  RankFourTensor _Cijkl;
};


